package com.retail.system.service;

import com.retail.core.common.CommonService;
import com.retail.core.entity.result.Result;
import com.retail.system.entity.po.AdminPo;
import com.retail.system.entity.request.AdminRequest;
import com.retail.system.entity.request.AdminUpdatePassRequest;
import com.retail.system.entity.vo.AdminStatisticsPersonVo;
import com.retail.system.entity.vo.AdminVo;
import com.retail.team.entity.vo.RetailTeamAddSpVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户表
 *
 * @author r.guo
 * @since 2019-05-25
 */
public interface AdminService extends CommonService<AdminRequest, AdminVo> {

    /**
     * 修改密码
     *
     * @param adminUpdatePassRequest 用户密码更新
     * @return 返回更新状态信息
     */
    Integer updatePassword(AdminUpdatePassRequest adminUpdatePassRequest);

    /**
     * 更加用户名称得到用户信息
     *
     * @param usename 用户名称
     * @return 返回用户Model
     */
    AdminPo getModelByUserName(String usename);

    AdminVo getUseByOpenId(String openId);


    /**
     * 验证手机号码和openid是否已经别注册
     *
     * @param
     * @return java.lang.Integer
     */
    Result registerUser(AdminRequest adminRequest);


    Result updateUserInfo(AdminRequest adminRequest);

    Result<Integer> examineVerify(AdminRequest request);

    List<AdminVo> childAdminByParentId(Long adminId);
    List<AdminVo> childAdminByParentIdAndId(Long adminId);

    AdminVo getModelByPoiId(String poiId);

    Integer authInfo(String urlZm, String urlFm, Long id);

    List<AdminVo> noParentIdAdmin();

    RetailTeamAddSpVo findTeamSpLimit1(Long adminId);

    List<AdminVo> myteams(Long adminId);

    List<AdminVo> findAdminsByUserTypeAndAdminLevel(Integer userType, int adminLevel);

    Integer updateUpgradeLevel(AdminVo admin);

    AdminStatisticsPersonVo statisticsPerson(Long id);

    Integer updateCity(Long id, String city);


    //所有业务员
    Integer allYwy();

}
